package camel.first.api.service.internal;

import camel.first.api.service.IXMLParserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

public class XMLParserService implements InitializingBean, DisposableBean, IXMLParserService {
	
	private static final Logger logger = LoggerFactory.getLogger(XMLParserService.class);
	
	private String serverHost;
	@Override
	public void setServerHost(String serverHost) {
		this.serverHost = serverHost;
	}
    @Override
	public void transFileContent(String xml,String name) {
		logger.debug("OSGI Service: Transferring " + xml+ "name :" + name
				+ " using server " + serverHost);
	}

	public void afterPropertiesSet() throws Exception {
		logger.debug("??? Created service connected to host '" + serverHost + "'");
	}

	public void destroy() throws Exception {
		logger.debug("Shutting down the service. ");
	}

}
